home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / DevTools / eText5 / Source / eTLiteral.subproj / eTISINDEXLiteral.m next >
Encoding:
Text File  |  1994-10-18  |  1.1 KB  |  37 lines

  1. //This is a separate file to allow link ordering(prinicpalClass got screwed up)
  2. #import "eTLiteral.h"
  3. @implementation eTISINDEXLiteral
  4. + toolAwake:theApp
  5. {
  6.     char        buf[MAXPATHLEN];
  7.     NXBundle    *bundle;
  8.     id             icon=nil;
  9.  
  10.     bundle = [NXBundle bundleForClass:[eTISINDEXLiteral class]];
  11.     if ([bundle getPath:buf 
  12.         forResource:"eTISINDEXLiteralIcon" ofType:"tiff"] ) {
  13.         icon=[[NXImage alloc] initFromFile:buf];
  14.         [icon setName:"eTISINDEXLiteralIcon"];
  15.     } else {
  16.         NXLogError("Image not found: eTISINDEXLiteralIcon");
  17.     }    
  18.     [theApp   registerAnnotation: [eTISINDEXLiteral class] 
  19.                             name: "eTISINDEXLiteral--HTML"
  20.                     RTFDirective: "eTISINDEXLiteral"    // should never be used
  21.                        menuLabel: "HTML/ISINDEX tag"
  22.                          menuKey: '\0'
  23.                         menuIcon: (NXImage *) nil];
  24.     return self;
  25. }
  26.  
  27. - initFromPboard:thePB inDoc:theDoc linked:(BOOL) linked
  28. {
  29.     [super initFromPboard:thePB inDoc: theDoc linked:linked];
  30.     [self setTheRep:"<ISINDEX>\n" forFormat:HTMD_FMT]; 
  31.     //self->isa = [eTLiteral class];    // promotion
  32.     [self setImageComponent:
  33.         [eTImageComponent newImageNamed:"eTISINDEXLiteralIcon"]];
  34.     [imageComponent setDoc:theDoc];
  35.     return self;
  36. }
  37. @end